package observerNotification;

import java.io.File;
import java.net.InetAddress;


/**
 * Message: propposed to send a file
 * 
 * <p>
 * <ul>
 * <li>Project: 	ChatSystemG3</li>
 * </ul>
 * </p>
 * 
 * @author COMBES Nicolas - LECHANTRE Arnaud
 * @see ObserverNotification
 */
public class FileObserverNotification extends ConversationObserverNotification {

	private File file;				//file to send to the remote user
	private long fileLength;

	/**
	 * Construct
	 * @param convId  : unique identifier of the conversation in which the message should be sent
	 * @param ipAddress	: ip address of the remote user 
	 * @param username	: name of the user that have sent the message
	 * @param message : message that has been sent
	 */
	public FileObserverNotification(int convId, InetAddress ipAddress,
			String username, File file) {
		super(convId, ipAddress, username);
		this.file = file;
		this.fileLength=file.length();
	}
	
	public FileObserverNotification(int convId, InetAddress ipAddress,
			String username, File file, long size) {
		super(convId, ipAddress, username);
		this.file = file;
		this.fileLength=size;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public long getFileLength() {
		return this.fileLength;
	}

}
